package com.example.demo.dto.system;

import com.example.demo.entity.system.SysUser;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 用户DTO，包含基本信息和动态字段
 */
public class UserDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 用户基本信息 */
    private SysUser user;
    
    /** 系统编码 */
    private String systemCode;
    
    /** 动态字段值，key为字段标识，value为字段值 */
    private Map<String, Object> dynamicFields = new HashMap<>();

    public SysUser getUser() {
        return user;
    }

    public void setUser(SysUser user) {
        this.user = user;
    }

    public String getSystemCode() {
        return systemCode;
    }

    public void setSystemCode(String systemCode) {
        this.systemCode = systemCode;
    }

    public Map<String, Object> getDynamicFields() {
        return dynamicFields;
    }

    public void setDynamicFields(Map<String, Object> dynamicFields) {
        this.dynamicFields = dynamicFields;
    }
    
    public void addDynamicField(String key, Object value) {
        this.dynamicFields.put(key, value);
    }
} 